<template>
  <div>
    <div class="copy"><a href="https://beian.miit.gov.cn/" target="_blank">粤ICP备16114903号</a></div>
    <div class="navtabs_blank"></div>
    <div class="navtabs">
      <div class="item on" @click="handelBtn('/')">
        <img
          class="icon"
          :src="Navigation == 'home' ? 'https://youyang-cdn.mdshuzhi.com/upload/icon_home_s.png' : 'https://youyang-cdn.mdshuzhi.com/upload/icon_home_n.png'"
        />
        <div class="p" :class="Navigation == 'home' ? 'on' : ''">首页</div>
      </div>
      <div class="item item1" @click="handelBtn(play)">
        <img class="icon" src="https://youyang-cdn.mdshuzhi.com/upload/icon_listen.png" />
        <div class="p">播放</div>
      </div>
      <div class="item" @click="handelBtn(mine)">
        <img
          class="icon"
          :src="Navigation == 'mine' ? 'https://youyang-cdn.mdshuzhi.com/upload/icon_mine_s.png' : 'https://youyang-cdn.mdshuzhi.com/upload/icon_mine_n.png'"
        />
        <div class="p" :class="Navigation == 'mine' ? 'on' : ''">我的</div>
      </div>
      <img class="bg" src="https://youyang-cdn.mdshuzhi.com/upload/pic_bose_bg.png" />
    </div>
  </div>
</template>
<script>
export default {
  props: {
    current: {
      type: String,
      value: "1",
    },
    Navigation: String,
  },
  data() {
    return {
      homeS: "https://youyang-cdn.mdshuzhi.com/upload/icon_home_s.png",
      homeN: "https://youyang-cdn.mdshuzhi.com/upload/icon_home_n.png",
      mineS: "https://youyang-cdn.mdshuzhi.com/upload/icon_mine_s.png",
      mineN: "https://youyang-cdn.mdshuzhi.com/upload/icon_mine_n.png",
      mine:localStorage.getItem("token") ? '/PersonalCenter' : "/NotLoggedIn",
      play:localStorage.getItem("token") ? '/Playing' : "/login",
    };
  },
  methods: {
    handelBtn(route) {
      console.log(this.$route, this.$route.path, this.$router);
      let currentRoute = this.$route.path;

      if (currentRoute == route) {
        return;
      } else {
        this.$router.replace(route);
      }
    },
  },
};
</script>
<style lang="scss" type="text/css">
.navtabs_blank{width: 100%;height: 160px;}
.navtabs {
  position: fixed;
  z-index: 102;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 130px;
  width: 100%;
  min-width: 640px;
  max-width: 960px;
	margin: 0 auto;
  display: flex;
  justify-content: space-around;
  flex-direction: row;
  align-items: flex-end;
  .bg {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    margin: auto;
    z-index: 1;
  }
  .item {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
    color: #a9a9c9;
    font-size: 20px;
    width: 33.33%;
    text-align: center;
    .icon {
      width: 40px;
      height: 40px;
      display: block;
      margin: 0 auto 10px;
    }
    .on {
      color: #e66d4d;
    }
  }
  .item1 .icon {
    width: 88px;
    height: 88px;
    display: block;
    margin: 0 auto;
  }
}

</style>
